﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="editarPostNew.aspx.cs" Inherits="UI.editarPostNew" MasterPageFile="~/wiki.Master"%>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>

<asp:Content ID="editarPostNewContent" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
    <h2>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:Label ID="lbEditOrNew" runat="server"></asp:Label>
        Post New</h2>
        <asp:UpdatePanel ID="UpdatePanel" runat="server">
            <ContentTemplate>
        <asp:Panel ID="pnSucesso" runat="server" BackColor="#CCFFCC" 
        style="text-align: center" Visible="False">
        <img alt="" src="Images/Ok-16x16.png" style="width: 16px; height: 16px" />
        <asp:Label ID="lbMsgSucesso" runat="server" 
            style="font-weight: 700; color: #006600; font-size: small"></asp:Label>
    </asp:Panel>
    <asp:Panel ID="pnFalha" runat="server" BackColor="#FFCCCC" 
                    style="text-align: center" Visible="False">
                    &nbsp;<img alt="" src="Images/Error-16x16.png" style="width: 16px; height: 16px" />
                    <asp:Label ID="lbMsgFalha" runat="server" 
                        style="font-weight: 700; color: #FF0000; font-size: small;"></asp:Label>
                </asp:Panel>
    <asp:ValidationSummary ID="vsEditarPostNew" runat="server" BackColor="#FFFFCC" 
        Font-Bold="True" style="font-size: small" />
                
    <table style="width: 100%; font-size: small;">
        <tr>
            <td style="color: #000000">
                <b>Titulo:</b></td>
            <td>
                <asp:TextBox ID="txtTitulo" runat="server" Width="280px" MaxLength="50"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvTitulo" runat="server" 
                    ControlToValidate="txtTitulo" Display="None" 
                    ErrorMessage="Informe o campoTitulo!"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="color: #000000">
                <b>Descrição:</b></td>
            <td>
                <asp:TextBox ID="txtDescricao" runat="server" Height="200px" 
                    TextMode="MultiLine" Width="365px"></asp:TextBox>
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvDescricao" runat="server" Display="None" 
                    ErrorMessage="Informe o campo Descrição!" ControlToValidate="txtDescricao"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="color: #000000">
                Tag&#39;s:</td>
            <td style="text-align: left">
                <cc1:ComboBox ID="cmbTag" runat="server" DataTextField="descricao" 
                    DataValueField="idTag" Width="150px">
                    <asp:ListItem>dsds</asp:ListItem>
                    <asp:ListItem>dsds</asp:ListItem>
                </cc1:ComboBox>
                <asp:Button ID="btAddTag" runat="server" CausesValidation="False" 
                    CssClass="botao" Height="20px" onclick="btAddTag_Click" Text="&gt;" 
                    Width="25px" />
                <br />
                <asp:ListBox ID="ltbTag" runat="server" Height="60px" Width="178px" 
                    DataTextField="descricao" DataValueField="idTag">
                </asp:ListBox>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td style="color: #000000">
                <b>Imagem:</b></td>
            <td>
                <img id="imgPostNew" height="50" width="65" runat="server"/>
                <asp:FileUpload ID="fupImage" runat="server" CssClass="button-search" />
            </td>
            <td>
                <asp:RequiredFieldValidator ID="rfvImage" runat="server" 
                    ControlToValidate="fupImage" Display="None" 
                    ErrorMessage="Insira uma imagem à Post New" Enabled="False"></asp:RequiredFieldValidator>
            </td>
        </tr>
        </table>
            </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="UpdateProgress" runat="server" 
        AssociatedUpdatePanelID="UpdatePanel" DisplayAfter="50">
        <ProgressTemplate>
            <img alt="" src="Images/carregando.gif" 
                style="width: 16px; height: 16px; text-align: center" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <br />
        <table>
        <tr>
            <td style="color: #000000; width: 365px;">
                &nbsp;</td>
            <td style="text-align: right">
                <asp:Button ID="btOk" runat="server" Height="20px" Text="OK" CssClass="botao" 
                    Width="40px" onclick="btOk_Click" />
                &nbsp;<asp:Button ID="btVoltar" runat="server" Height="20px" Text="Voltar" CssClass="botao" 
                    Width="40px" onclick="btVoltar_Click" />
            </td>
        </tr>
    </table>

</asp:Content>